package com.ym.medical.domain.param;

import com.ym.common.annotations.CustomConstraint;
import com.ym.common.constant.BeanCovert;
import com.ym.medical.domain.entity.ServiceTermsEntity;
import com.ym.medical.enums.ServiceTermsEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

import static com.ym.common.constant.ValidRule.Add;
import static com.ym.common.constant.ValidRule.Update;

/**
 * 法务条款表对象 service_terms
 *
 * @author ym
 * @date 2020-09-23
 */
@ApiModel("法务条款表-修改")
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ServiceTermsUpdateParam extends BeanCovert<ServiceTermsEntity> {

    @ApiModelProperty("主键")
    @NotNull(message = "主键不能为空", groups = {Add.class, Update.class})
    private Long id;

    @ApiModelProperty("标识号")
    @Size(max = 32, message = "标识号长度超过{max}", groups = {Add.class, Update.class})
    private String termsCode;

    @ApiModelProperty("条款名称")
    @Size(max = 255, message = "条款名称长度超过{max}", groups = {Add.class, Update.class})
    @CustomConstraint(ServiceTermsEnum.class)
    private String termsName;

    @ApiModelProperty("条款内容")
    @Size(groups = {Add.class, Update.class})
    private String temsContentUrl;

    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("状态")
    @Size(max = 2, message = "状态长度超过{max}", groups = {Add.class, Update.class})
    private String state;

}
